ProjectName.modules.User = {
    init: function () {
        this.formValidation();
    } ,
    formValidation : function () {
        var container = $("div.pageerrorcontainer-validator");
        $("#userfrm").validate({
            errorContainer: container,
            errorLabelContainer: $("div.error-iterator", container),
            wrapper: "div",
            rules: {
                username: {
                    required: true
                },
                firstname: {
                    required: true
                },
                lastname: {
                    required: true
                },
                email: {
                    required: true,
                    email: true
                },
                password: {
                    minlength: 5
                },
                repeatpassword: {
                    equalTo: "#password"
                },
                status: {
                    required: true
                }
            },
            messages: {
                username: {
                    required: "Please enter dealer profile name."
                },
                firstname: {
                    required: "Please enter first name."
                },
                lastname: {
                    required: "Please enter last name."
                },
                email: {
                    required: "Please enter email.",
                    email: "Email address is not valid"
                },
                password: {
                    minlength: "Password should contain more than 5 characters."
                },
                repeatpassword: {
                    equalTo: "Password and Repeat password doesnot match."
                },
                status: {
                    required: "Please select status."
                }
            }
        });
    } 
}
